<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<jsp:include page="/WEB-INF/views/common/header.jsp" />

<link rel="stylesheet" href="<c:out value="${pageContext.request.contextPath}"/>/resources/common/bootstrap/css/bootstrap-datepicker.min.css">

<script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/resources/js/repair_create_popup.js"></script>
<script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/resources/common/bootstrap/js/bootstrap-datepicker.min.js"></script>

<script type="text/javascript">
	$(document).ready(function() {
		var firstdate;
		
		var startdate = $('#firstaction_release_start_date').datepicker({
			format: "yyyy-mm-dd",
			autoclose: true,
			todayHighlight: true
		}).on('changeDate', function(ev) {
			firstdate = ev.date.valueOf();
		});
		
		$('#firstaction_release_end_date').datepicker({
			format: "yyyy-mm-dd",
			autoclose: true,
			todayHighlight: true,
		});
	});
	
</script>

</head>
<body>
	<jsp:include page="/WEB-INF/views/main/menu.jsp" />

	<div class="container">
		<div class="page-header">
			<h3>선조치 처리 및 반납내역</h3>
		</div>
		<form class="form-inline">
			<h4>조회조건</h4>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="firstaction_release_date" style="width: 100px">선조치 출고일</label> 
						<div class="input-group date" id="firstaction_release_start_date">
  							<input type="text" class="form-control" size="7" disabled="disabled">
  								<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
						</div>
						<label class="control-label" for="firstaction_release_date" style="width: 90px; text-align:center;">~</label> 
						<div class="input-group date" id="firstaction_release_end_date">
  							<input type="text" class="form-control" size="7" disabled="disabled">
  								<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="acquisition_dept" style="width: 100px">인수처</label> 
						<input type="text" class="form-control" id="acquisition_dept" size="59">
					</div>
				</div>
			</div>
			<p />
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="customer_code" style="width: 100px">고객</label> 
						<input type="text" class="form-control" id="customer_code" placeholder="고객 코드" disabled>
						<div class="input-group">
							<label class="sr-only" for="customer_name">고객명</label> 
							<input type="text" class="form-control" id="customer_name" placeholder="고객 명" disabled> 
							<span class="input-group-btn">
								<input type="button" class="btn btn-primary btn-sm" id="customer_btn" value="선택"/>
							</span>
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="acquirers" style="width: 100px">인수자</label> 
						<input type="text" class="form-control" id="acquirers" size="59">
					</div>
				</div>
			</div>
			<p />
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="operator_code" style="width: 100px">운용국</label> 
						<input type="text" class="form-control" id="operator_code" placeholder="운용국 코드" disabled>
						<div class="input-group">
							<label class="sr-only" for="operator_name">운용국 명</label> 
							<input type="text" class="form-control" id="operator_name" placeholder="운용국 명" disabled> 
							<span class="input-group-btn">
								<input type="button" class="btn btn-primary btn-sm" id="operator_btn" value="선택"/>
							</span>
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="serial_no_scanning" style="width: 100px">Serial No.</label> 
						<input type="text" class="form-control" id="serial_no_scanning" size="59">
					</div>
				</div>
			</div>
			<p />
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="item" style="width: 100px;">품목</label> 
						<input type="text" class="form-control" id="item_code" placeholder="품목 코드" disabled>
						<div class="input-group">
							<input type="text" class="form-control" id="item_name" placeholder="품목 명" disabled> 
							<span class="input-group-btn"> 
								<input type="button" class="btn btn-primary btn-sm" id="item_btn" value="선택" />
							</span>
						</div>
					</div>
				</div>
			</div>
			<p />
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group form-group-sm">
						<label class="control-label" for="release_dept" style="width: 100px;">출고부서</label> 
						<input type="text" class="form-control" id="release_dept_code" placeholder="출고 부서코드" disabled>
						<div class="input-group">
							<input type="text" class="form-control" id="release_dept_name" placeholder="출고 부서명" disabled> 
							<span class="input-group-btn"> 
								<input type="button" class="btn btn-primary btn-sm" id="release_dept_btn" value="선택" />
							</span>
						</div>
					</div>
				</div>
				<div class="col-sm-2">
					<div class="form-group form-group-sm">
						<label class="control-label" for="return_type" style="width: 100px">반납유형</label> 
						<label>
							<input type="radio" name="optionsRadios" id="total_return" value="total_return" checked>
							&nbsp;전체
						</label>	
					</div>
				</div>
				<div class="col-sm-1">
					<div class="form-group form-group-sm">
						<label>
							<input type="radio" name="optionsRadios" id="return_ok" value="return_ok" >
							&nbsp;반납
						</label>
					</div>
				</div>
				<div class="col-sm-1">
					<div class="form-group form-group-sm">
						<label>
							<input type="radio" name="optionsRadios" id="return_nok" value="return_nok" >
							&nbsp;미반납
						</label>
					</div>
				</div>
			</div>
			<hr />
			<div class="row">
				<div class="col-sm-push-6 col-sm-2">
					<a href=firstaction_create><input type="button" class="btn btn-primary btn-sm btn-block" id="firstaction_record_create" value="선조치 내역작성"></a>
				</div>
				<div class="col-sm-push-6 col-sm-2">
					<input type="button" class="btn btn-primary btn-sm btn-block" id="del" value="지우기">
				</div>
				<div class="col-sm-push-6 col-sm-2">
					<input type="button" class="btn btn-primary btn-sm btn-block" id="find" value="찾기">
				</div>
			</div>
			<hr />		
			<h4>결과</h4>
		</form>
		<p />
		<table data-toggle="table"
			<%-- data-url="<c:out value="${pageContext.request.contextPath}"/>/resources/test_data/data.json" --%>
			data-height="600" data-pagination="true" data-search="false">
			<thead>
				<tr>
					<th data-field="state" data-checkbox="true"></th>
					<th data-field="no" data-align="center">No</th>
					<th data-field="customer_name" data-align="center">고객명</th>
					<th data-field="operator_id" data-align="center">운용국</th>
					<th data-field="item_code" data-align="center">품목</th>
					<th data-field="item_name" data-align="center">품명</th>
					<th data-field="serial_no" data-align="center">Serial No.</th>
					<th data-field="release_date" data-align="center">출고일</th>
					<th data-field="desc" data-align="center">비고</th>
					<th data-field="return_type" data-align="center">반납유형</th>
					<th data-field="return_item_code" data-align="center">반납품목</th>
					<th data-field="return_item_name" data-align="center">반납품명</th>
					<th data-field="return_searial" data-align="center">반납Searial</th>
					<th data-field="return_revision" data-align="center">반납Revision</th>
					<th data-field="return_desc" data-align="center">반납비고</th>
					<th data-field="return_model" data-align="center">반납기종</th>
					<th data-field="return_date" data-align="center">반납일</th>
					<th data-field="return_people" data-align="center">반납자</th>
					<th data-field="project" data-align="center">프로젝트</th>
					<th data-field="revision" data-align="center">REVISION</th>
					<th data-field="order_reason" data-align="center">요청사유</th>
					<th data-field="firstaction_type" data-align="center">선조치유형</th>
					<th data-field="release_dept" data-align="center">출고부서</th>
					<th data-field="acquisition_dept" data-align="center">인수처</th>
					<th data-field="acquirers" data-align="center">인수자</th>
				</tr>
			</thead>
		</table>
		<p />
		<div class="row">
			<div class="col-sm-offset-8 col-sm-2">
				<a href=""><input type="button"
					class="btn btn-primary btn-sm btn-block" id="return_type_change_btn" value="반납유형변경"></a>
			</div>
			<div class="col-sm-2">
				<a href=""><input type="button"
					class="btn btn-primary btn-sm btn-block" id="return_history_create" value="반납내역작성"></a>
			</div>
		</div>
	</div>
	<div class="modal fade" role="dialog" id="modalDiv">
		<div class="modal-dialog">
			<div class="modal-content"></div>
		</div>
	</div>
</body>
</html>